package device;

import interfaces.IDisplayGauge;

/**
 * @author Stefano&Davide
 * @version 1.0
 */

public class Odometer extends OdometerNoDisplay {

	protected IDisplayGauge display;

	public Odometer(IDisplayGauge display){
		super();
		this.display = display;
	}
	
	public void finalize() throws Throwable {
		super.finalize();
	}
	
	@Override
	public String getCurValRepDisplayed(){
		return display.getCurValGaugeDisplayed();
	}
	
	@Override
	public void update() throws Exception{
		super.update();
		display.update(super.getVal().getDefaultRep());
	}
}	
	
	